<!--
 * @Author: your name
 * @Date: 2021-09-16 10:57:32
 * @LastEditTime: 2021-09-16 11:12:38
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\6-jQuery\day05\11-B1.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background-color: aquamarine;
            height: 400px;
        }
    </style>
    <script>
        window.onmessage = function(event) {
            //event.data 获取传递过来的数据
            console.log(event.data);
            //event.origin 获取目标源
            console.log(event.origin);
        }
    </script>
</head>

<body>
    b的页面
</body>

</html>